package com.itheima.zifu;

import java.io.FileReader;
import java.io.IOException;
import java.nio.charset.Charset;

/*
字符输入流一次度一个数组
 */
public class Demo07 {

    public static void main(String[] args) throws IOException {
        FileReader reader = new FileReader("day13\\aaa\\d.txt", Charset.forName("gbk"));
        int len;
        char[] chars= new char[1024];
        while ((len=reader.read(chars))!=-1){
            //chars
            String s = new String(chars, 0, len);
            System.out.println(s);
        }
    reader.close();
    }
}
